From: Ray Strode Date: Mon, 18 Oct 2010 15:45:34 +0000 (-0400) Subject: st-theme: ref items in custom stylesheets list X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9643 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a5d4abda007c37b9b7e92617bce4ae361d7d16e1;p=gnome-shell.git st-theme: ref items in custom stylesheets list st-theme stores some loaded stylesheets in a custom stylesheets list. When removing items from this list it unrefs them, but when adding items to the list it neglects to ref them. This means that under certain circumstances the list will contain items that have already been freed. https://bugzilla.gnome.org/show_bug.cgi?id=632477 --- diff --git a/src/st/st-theme.c b/src/st/st-theme.c index 4134b758b..6e2fd2c74 100644 --- a/src/st/st-theme.c +++ b/src/st/st-theme.c @@ -320,6 +320,7 @@ st_theme_load_stylesheet (StTheme *theme, return FALSE; insert_stylesheet (theme, path, stylesheet); + cr_stylesheet_ref (stylesheet); theme->custom_stylesheets = g_slist_prepend (theme->custom_stylesheets, stylesheet); return TRUE;